How to prepare to install Charmed Kubeflow on MicroK8s behind a web proxy 您所在的位置:网站首页 kubeflow spark How to prepare to install Charmed Kubeflow on MicroK8s behind a web proxy

How to prepare to install Charmed Kubeflow on MicroK8s behind a web proxy

#How to prepare to install Charmed Kubeflow on MicroK8s behind a web proxy | 来源: 网络整理| 查看: 265

How to prepare to install Charmed Kubeflow on MicroK8s behind a web proxy

This document shows you how to prepare your environment if you intend to go on and install (deploy) Charmed Kubeflow on MicroK8s behind a web proxy.

Contents:

Configure the systems for operation behind a web proxy Configure the required domains Install and configure MicroK8s Install and configure Juju

Configure the systems for operation behind a web proxy

Since MicroK8s includes a few utilities (eg, curl, helm) it makes sense to configure the system proxy settings in /etc/environment. We’ll need to add a few addresses to the proxy exclusion list so that things work as they should.

CLUSTER_SUBNET=/24 CLUSTER_HOSTS= #comma separated PROXY_HOST=squid.internal #change as required PROXY_PORT=3128 #change as required JUJU_CONTROLLER_NAME=uk8s #change as required echo "HTTPS_PROXY=http://$PROXY_HOST:$PROXY_PORT" | sudo tee -a /etc/environment echo "HTTP_PROXY=http://$PROXY_HOST:$PROXY_PORT" | sudo tee -a /etc/environment echo "NO_PROXY=10.1.0.0/16,10.152.183.0/24,127.0.0.1,$CLUSTER_SUBNET,$CLUSTER_HOSTS,admission-webhook.kubeflow.svc,modeloperator.kubeflow.svc,modeloperator.controller-$JUJU_CONTROLLER_NAME.svc,spark.kubeflow.svc,katib-controller.kubeflow.svc,169.254.169.254" | sudo tee -a /etc/environment echo "https_proxy=http://$PROXY_HOST:$PROXY_PORT" | sudo tee -a /etc/environment echo "http_proxy=http://$PROXY_HOST:$PROXY_PORT" | sudo tee -a /etc/environment echo "no_proxy=10.1.0.0/16,10.152.183.0/24,127.0.0.1,$CLUSTER_SUBNET,$CLUSTER_HOSTS,admission-webhook.kubeflow.svc,modeloperator.kubeflow.svc,modeloperator.controller-$JUJU_CONTROLLER_NAME.svc,spark.kubeflow.svc,katib-controller.kubeflow.svc,169.254.169.254" | sudo tee -a /etc/environment

Reboot the machines and wait until they’re up again.

sudo reboot

Configure the required domains

You may need to add the following domains to your firewall’s allow-list:

api.charmhub.io:443 api.jujucharms.com:443 api.snapcraft.io:443 auth.docker.io:443 canonical-bos01.cdn.snapcraftcontent.com:443 canonical-lgw01.cdn.snapcraftcontent.com:443 gcr.io:443 gchr.io:443 k8s.gcr.io:443 production.cloudflare.docker.com:443 registry-1.docker.io:443 registry.jujucharms.com:443 rocks.canonical.com:443 storage.googleapis.com:443 streams.canonical.com:443

Once done, you can proceed with the installation.

Install and configure MicroK8s

First, install MicroK8s.

Kubernetes 1.21:

Remember to install the supported MicroK8s version 1.21/stable for Charmed Kubeflow.

sudo snap install microk8s --channel=1.21/stable --classic

Now, enable MicroK8s storage and wait for it to be available.

microk8s enable storage

Finally, when running behind a proxy, CoreDNS may not be able to reach public DNS servers, so you may want to configure MicroK8s to use a local DNS server. You can configure the DNS server that MicroK8s uses to use the host’s DNS server configuration as follows:

microk8s enable dns:$(resolvectl status | grep "Current DNS Server" | awk '{print $NF}')"

Install and configure Juju

Once you’ve deployed MicroK8s as above, the next steps are to install and bootstrap Juju.

PROXY_HOST="squid.internal" #change as required PROXY_PORT=3128 #change as required CLUSTER_SUBNET=/24 sudo snap install juju --classic sudo snap install juju-bundle --classic sudo snap install juju-wait --classic juju bootstrap microk8s uk8s juju add-model kubeflow juju model-config \ {juju,apt,snap}-http{,s}-proxy=http://$PROXY_HOST:$PROXY_PORT \ apt-no-proxy=localhost,127.0.0.1 \ juju-no-proxy=localhost,127.0.0.1,0.0.0.0,10.0.8.0/24,$CLUSTER_SUBNET

Congratulations, now you’re ready to install (deploy) Charmed Kubeflow on MicroK8s behind a web proxy.

See more: How to install Charmed Kubeflow > Deploy Charmed Kubeflow

Last updated 27 days ago.

Help improve this document in the forum.



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有